package com.zk.mylib.extension

import android.util.TypedValue
import android.view.View

fun View.dp2px(dimen: Float) : Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dimen, resources.displayMetrics)

fun View.dp2px(dimen: Int) : Float = dp2px(dimen.toFloat())